package com.immunology.service.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.immunology.dao.SurveyDao;
import com.immunology.domain.Role;
import com.immunology.domain.Survey;
import com.immunology.exception.DaoException;
import com.immunology.service.SurveyService;

@Service
public class SurveyServiceImpl implements SurveyService{

	@Autowired
	private SurveyDao surveyDao;

	@Override
	public Survey findById(Long id) throws DaoException {
		return surveyDao.findById(id);
	}

	@Override
	public List<Survey> getAll() throws DaoException {
		return surveyDao.getAll();
	}

	@Override
	public void saveOrUpdate(Collection<Survey> entities) throws DaoException {
		surveyDao.saveOrUpdate(entities);
	}

	@Override
	public void saveOrUpdate(Survey... entities) throws DaoException {
		surveyDao.saveOrUpdate(entities);
	}

	@Override
	public void update(Collection<Survey> entities) throws DaoException {
		surveyDao.update(entities);
	}

	@Override
	public void update(Survey... entities) throws DaoException {
		surveyDao.update(entities);
	}

	@Override
	public void delete(Collection<Survey> entities) throws DaoException {
		surveyDao.delete(entities);
	}
	
	@Override
	public void delete(Survey... entities) throws DaoException {
		surveyDao.delete(entities);
	}

	@Override
	public void deleteAll() throws DaoException {
		surveyDao.deleteAll();
	}

	@Override
	public void save(Collection<Survey> entities) throws DaoException {
		surveyDao.save(entities);
	}

	@Override
	public void save(Survey... entities) throws DaoException {
		surveyDao.save(entities);
	}
}
